/**
 * Program   :   SimpleListBaseAction.java
 * Author    :   shadow guo
 * Create    :   2013-6-23 上午12:58:38
 *
 * Copyright 2008 by Tongfu Information Technology Co. Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Tongfu Information Technology Co. Ltd. ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with Tongfu Information Technology Co. Ltd.
 * 
 */
package com.tongfusoft.web.core.action;

import java.util.List;
import java.util.Map;

import com.tongfusoft.web.core.data.Page;
import com.tongfusoft.web.core.service.IListService;

public class SimpleListBaseAction extends BaseAction {
	private static final long serialVersionUID = 1L;

	private IListService listService;
	protected List result;
	
	public List getResult() {
		return result;
	}

	public void setResult(List result) {
		this.result = result;
	}

	public IListService getListService() {
		return listService;
	}

	public void setListService(IListService listService) {
		this.listService = listService;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	public String list() {
		try {
			Map param = getRequesAndSessiontMap();
			Page page = new Page();
			//最大100条数据
			page.setPageSize(100);
			page.setTotalCount(100);
			page = listService.findOnPage(param, page);
			result = page.getResult();
		} catch (Exception e) {
			LOG.error(e.getMessage(), e);
		}

		return "list";
	}
	
}
